package com.novel.entiy;

import com.baomidou.mybatisplus.annotation.*;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.Date;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 *
 * @author tanghao
 * @date 2022/4/24
 */

/**
 * 订阅表
 */
@ApiModel(value = "com-novel-entiy-Subscribe")
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
@TableName(value = "subscribe")
public class Subscribe {
    @TableId(value = "id", type = IdType.AUTO)
    @ApiModelProperty(value = "")
    private Integer id;

    /**
     * 文章id
     */
    @TableField(value = "novel_id")
    @ApiModelProperty(value = "文章id")
    private Long novelId;

    /**
     * 用户id
     */
    @TableField(value = "user_id")
    @ApiModelProperty(value = "用户id")
    private Long userId;

    /**
     * 订阅时间
     */
    @JsonFormat(locale="zh", timezone="GMT+8", pattern="yyyy-MM-dd HH:mm:ss")
    @TableField(value = "created_time",fill = FieldFill.INSERT)
    @ApiModelProperty(value = "订阅时间")
    private Date createdTime;

    public static final String COL_ID = "id";

    public static final String COL_NOVEL_ID = "novel_id";

    public static final String COL_USER_ID = "user_id";

    public static final String COL_CREATED_TIME = "created_time";
}